// Created on Jan 2, 2012 by mo

package com.tutos.modules;

import java.util.HashMap;
import java.util.Map;

import com.google.inject.servlet.ServletModule;
import com.google.inject.servlet.ServletScopes;
import com.tutos.servlets.WHMDApplication;
import com.tutos.ui.TutosApplication;
import com.vaadin.Application;

/**
 * All basic binding should be done in here prior to starting any tasks.
 * 
 * @author mo
 */

public class GuiceServletModule extends ServletModule {
	@Override
	protected void configureServlets() {
		super.configureServlets();

		bind(Application.class).to(TutosApplication.class).in(ServletScopes.SESSION);
		
		Map<String, String> parameters = new HashMap();
		parameters.put("application", "com.tutos.ui.TutosApplication");
		parameters.put("widgetset", "com.tutos.ui.widgetset.TutosApplication");
		
		serve("/*").with(WHMDApplication.class, parameters);
		
	}
}
